package com.zatech.cgnci.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zatech.cgnci.project.entity.CgnciReinsuranceInfoDO;
import com.zatech.cgnci.project.entity.CgnciReinsuranceRiskInsuredDO;

/**
 * <p>
 * 分入分出险种标的表 服务类
 * </p>
 *
 * @author Generator
 * @since 2025-03-19
 */
public interface CgnciReinsuranceRiskInsuredService extends IService<CgnciReinsuranceRiskInsuredDO> {

    void deleteReinsuranceRiskInsuredForBusiness(Long riskInsuredId, String type);


    /**
     * 删除分入分出险种标的
     *
     * @param reinsuranceType 类型(1-分入,3-临分分出)
     * @param businessId      业务id
     * @param riskSubTypeCode 险种代码
     * @param rowKey          标的唯一键
     */
    void deleteReinsuranceRiskInsured(String reinsuranceType, Long businessId, String riskSubTypeCode, String rowKey);

    /**
     * 删除分人方案/再保人险种标的
     *
     * @param reinsuranceInfoDO 分人/分出信息
     * @param riskSubTypeCode   险种代码
     * @param rowKey            标的唯一键
     */
    void deleteReinsurerRiskInsured(CgnciReinsuranceInfoDO reinsuranceInfoDO, String riskSubTypeCode, String rowKey, Long reinsurerId);

    /**
     * 删除的直保险种标的
     *
     * @param businessId      业务id
     * @param riskId          险种id
     * @param riskSubTypeCode 险种代码
     * @param rowKey          标的唯一键
     */
    void deleteReinsuranceRiskInsuredByDirect(Long businessId, Long riskId, String riskSubTypeCode, String rowKey);

    /**
     * 删除合约分出分项险种标的
     *
     * @param riskInsuredId 分人标的id
     */
    void deleteReinsuranceRiskInsuredForDivideOut(Long riskInsuredId);
}
